The present disclosure relates to anti-aliased rendering of objects.
Modern graphics processing engines that are used to render a set of primitives typically have a mode in which anti-aliasing is performed during rendering of the primitives.
Anti-aliasing, sometimes called anti-aliased rendering, is achieved by allocating N color buffers and rendering each primitive N times to the buffers. For any particular pixel, the N color values of the pixel specified in the N buffers represent N samples derived by rendering the set of primitives. To produce the anti-aliased image, where each pixel has a single color value, the N buffers are averaged together. This technique works well but requires a lot of memory, particularly when the desired number of samples is large. Since each buffer is completely rendered, the technique also demands significant memory bandwidth.
Alternatively, a buffer of size S×N may be used, where S is the size of the desired image. Using this buffer, N neighboring pixels (organized in a square pattern and therefore applicable when N is a power of two) correspond to a single pixel in the desired image. The scene is rendered once into this large buffer, where each object in the scene covers N times as many pixels as it would in the desired image. Every N pixels of the large buffer are averaged to obtain one anti-aliased pixel in the desired image. Using this technique, the required memory is also (N+1)×S, the buffer itself, plus another buffer for the desired image.